package com.code.train.service;

import com.code.train.domain.TrainSeat;
import com.code.train.req.TrainSeatQueryReq;
import com.code.train.req.TrainSeatSaveReq;
import com.code.train.resp.PageResp;
import com.code.train.resp.TrainSeatQueryResp;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * TrainService
 *
 * @param
 * @author 南汉卿
 * @return
 * @date 2025/8/21 23:57
 */
public interface TrainSeatService {
    void save(TrainSeatSaveReq req);

    PageResp<TrainSeatQueryResp> queryList(TrainSeatQueryReq req);

    void delete(Long id);

    @Transactional
    void genTrainSeat(String trainCode);

    List<TrainSeat> selectByTrainCode(String trainCode);
}